import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      redirect: '/dashboard'
    },
    {
      path: '/',
      component: resolve => require(['@/components/common/Home.vue'], resolve),
      meta: { title: '自述文件' },
      children:[
        {
          path: '/dashboard',
          component: resolve => require(['@/components/page/dashboard.vue'], resolve),
          meta: { title: '系统首页' }
        },
        {
          path: '/test',
          component: resolve => require(['@/components/page/test.vue'], resolve),
          meta: { title: 'test' }
        },
        {
          path: '/meun1',
          component: resolve => require(['@/components/page/Meun1.vue'], resolve),
          meta: { title: '菜单2-2' }
        },
        {
          path: '/meun2',
          component: resolve => require(['@/components/page/Meun2.vue'], resolve),
          meta: { title: '菜单2-3' }
        },
        {
          path: '/meun3',
          component: resolve => require(['@/components/page/Meun3.vue'], resolve),
          meta: { title: '菜单2-4' }
        },
        {
          path: '/meun4',
          component: resolve => require(['@/components/page/Meun4.vue'], resolve),
          meta: { title: '菜单2-5' }
        },
        {
          path: '/meun5',
          component: resolve => require(['@/components/page/Meun5.vue'], resolve),
          meta: { title: '菜单1-3' }
        },
        {
          path: '/meun6',
          component: resolve => require(['@/components/page/Meun6.vue'], resolve),
          meta: { title: '菜单1-4' }
        },
        {
          path: '/meun7',
          component: resolve => require(['@/components/page/Meun7.vue'], resolve),
          meta: { title: '菜单1-5' }
        },
        {
          path: '/meun8',
          component: resolve => require(['@/components/page/Meun8.vue'], resolve),
          meta: { title: '菜单1-6' }
        },
        {
          path: '/meun9',
          component: resolve => require(['@/components/page/Meun9.vue'], resolve),
          meta: { title: '菜单1-7' }
        },
        {
          path: '/meun10',
          component: resolve => require(['@/components/page/Meun10.vue'], resolve),
          meta: { title: '菜单1-8' }
        },
        {
          path: '/meun11',
          component: resolve => require(['@/components/page/Meun11.vue'], resolve),
          meta: { title: '菜单1-9' }
        },
        {
          path: '/meun12',
          component: resolve => require(['@/components/page/Meun12.vue'], resolve),
          meta: { title: '菜单1-10' }
        },
        {
          path: '/meun13',
          component: resolve => require(['@/components/page/Meun13.vue'], resolve),
          meta: { title: '菜单1-11' }
        },
        {
          path: '/meun14',
          component: resolve => require(['@/components/page/Meun14.vue'], resolve),
          meta: { title: '菜单1-12' }
        },
        {
          path: '/meun15',
          component: resolve => require(['@/components/page/Meun15.vue'], resolve),
          meta: { title: '菜单1-13' }
        },
        {
          path: '/meun16',
          component: resolve => require(['@/components/page/Meun16.vue'], resolve),
          meta: { title: '菜单1-14' }
        },
        {
          path: '/meun17',
          component: resolve => require(['@/components/page/Meun17.vue'], resolve),
          meta: { title: '菜单1-15' }
        },
        {
          path: '/meun18',
          component: resolve => require(['@/components/page/Meun18.vue'], resolve),
          meta: { title: '菜单1-16' }
        },
        {
          path: '/meun19',
          component: resolve => require(['@/components/page/Meun19.vue'], resolve),
          meta: { title: '菜单1-17' }
        },
        {
          path: '/meun20',
          component: resolve => require(['@/components/page/Meun20.vue'], resolve),
          meta: { title: '菜单1-18' }
        },
        {
          path: '/fruitList',
          component: resolve => require(['@/components/page/FruitList.vue'], resolve),
          meta: { title: '菜单1-1' }
        },
        {
          path: '/greensList',
          component: resolve => require(['@/components/page/GreensList.vue'], resolve),
          meta: { title: '菜单1-2' }
        },
        {
          path: '/fishList',
          component: resolve => require(['@/components/page/FishList.vue'], resolve),
          meta: { title: '菜单2-1' }
        },
        {
          path: '/lifeList',
          component: resolve => require(['@/components/page/LifeList.vue'], resolve),
          meta: { title: '菜单3-1' }
        },
        {
          path: '/404',
          component: resolve => require(['../components/page/404.vue'], resolve),
          meta: { title: '404' }
        }
      ]
    },
    {
      path: '/login',
      component: resolve => require(['@/components/page/Login.vue'], resolve),
      meta: { title: '用户管理' }
    },
    {
      path: '*',
      redirect: '/404'
    }
  ]
})
